//
// Created by vivi on 16/02/2018.
//

#include "core/engine/hairengine.h"

namespace HairEngine {
	HairEngineSimulationData::HairEngineSimulationData(const Eigen::Affine3f &transform_,
	                                                   const Eigen::Affine3f &previousTransform_, float t_):
			transform(transform_),
			previousTransform(previousTransform_),
			t(t_) {}

	HairEngineSimulationData::HairEngineSimulationData(const Eigen::Affine3f &restTransform):
			transform(restTransform),
			previousTransform(restTransform),
			t(-1.0f) {}

	void HairEngineSimulationData::update(const Eigen::Affine3f &transform_, const float t_) {
		previousTransform = transform;
		transform = transform_;
		t = t_;
	}

	bool HairEngineSimulationData::isInital() const { return (t <= 0.0f); }
}